home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 September
/
Macworld (1997-09).dmg
/
Serious Software
/
Cherwell Scientific Demos
/
pro Fit
/
pro Fit 5.0 demo (fpu).sea
/
pro Fit 5.0 demo (fpu)
/
External Modules
/
External modules sources
/
C
/
Multiply.c
< prev
next >
Wrap
Text File
|
1994-10-01
|
3KB
|
76 lines
/***************************************************************************************/
/* Multiply.c */
/* */
/* Version 26.9.94 */
/***************************************************************************************/
#include "proFit_interface.h"
/***************************************************************************************/
void SetUp ( short* const moduleKind, /* set moduleKind to isFunction or isProgram */
Str255 name, /* the name of the program or function (pascal string) */
long* const requiredGlobals, /* the number of bytes to be allocated in ExtModulesParamBlock.globals */
/* set requiredGlobals to 0 if you don't use this feature */
ExtModulesParamBlock* pb) /* the complete parameter block passed by pro Fit to the */
/* routines defined in this file. In most cases it can be ignored */
/* SetUp is called once when the external module is linked to proFit */
{
*moduleKind=isProgram; /* we define a program */
SetPascalStr(name,"\pMultiplication Table",255); /* its name */
*requiredGlobals = 0; /* we don't need global data */
}
/***************************************************************************************/
void InitializeProg (ExtModulesParamBlock* pb)
/* Can be left emtpy if not needed. */
/* called when the external module is linked to proFit after SetUp was called */
/* can be used to inititialize global variables, etc. */
{
}
/***************************************************************************************/
void Run(ExtModulesParamBlock* pb)
/* pro Fit calls this function when the name of the program is chosen from the */
/* Run Program submenu in the menu Calc */
{
short i, j;
for (i = 1 ; i<= NrRows();i++)
for (j = 1 ; j<= NrCols();j++)
SetData(i,j, i * j);
}
/***************************************************************************************/
void CleanUp (ExtModulesParamBlock* pb)
/* called when the function or program is removed from pro Fit's menus */
/* in most cases, this function can be empty */
{
}
/***************************************************************************************/
/* for functions, not used here: */
/***************************************************************************************/
void InitializeFunc (Boolean* const hasDerivatives, Str255 descr1stLine, Str255 descr2ndLine,
short* const numberOfParams, DefaultParamInfo* const a0, ExtModulesParamBlock* pb)
{}
void Func ( double x, ParamArray a, double* const y, ExtModulesParamBlock* pb)
{}
void Derivatives(double x, ParamArray a, ParamArray dyda, ExtModulesParamBlock* pb)
{}
short Check(short paramNo, DefaultParamInfo* const a0, ExtModulesParamBlock* pb)
{return ok;}
void First (ParamArray a, ExtModulesParamBlock* pb)
{}
void Last (ExtModulesParamBlock* pb)
{}